package com.sto.common.driverCost.service.impl;

import com.sto.common.annotation.ExcelHandler;
import com.sto.common.driverCost.entity.StoDriverTax;
import com.sto.common.driverCost.mappers.StoDriverTaxMapper;
import com.sto.common.driverCost.service.IStoDriverTaxService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sto.common.importExcel.dto.base.BaseImportExcelDto;
import com.sto.common.importExcel.dto.request.ImportExcelRequest;
import com.sto.common.importExcel.dubbo.service.AbstractExportExcelService;
import com.sto.common.importExcel.dubbo.service.AbstractImportExcelService;
import com.sto.common.listener.AbsExcelListenerConsumer;
import org.apache.commons.lang3.tuple.MutablePair;
import org.springframework.stereotype.Service;

import java.io.FileOutputStream;
import java.util.Map;
import java.util.function.Consumer;

/**
 * <p>
 * 司机个税表 服务实现类
 * </p>
 *
 * @author ChenPeng
 * @since 2022-07-15
 */
@Service(value = "stoDriverTax")
@ExcelHandler
public class StoDriverTaxServiceImpl extends ServiceImpl<StoDriverTaxMapper, StoDriverTax>
        implements IStoDriverTaxService, AbstractExportExcelService, AbstractImportExcelService {

    @Override
    public MutablePair<Boolean, String> easyExcelExportData(Map<String, String> queryMap, FileOutputStream out) {
        return null;
    }

    @Override
    public BaseImportExcelDto importExcel(ImportExcelRequest request) {
        /*final BaseImportExcelDto importExcelDto = BaseImportExcelDto.init(SafetyOfTheMonthExcelDto.class, 4);
        SafetyOfTheAwardExcelFacade facade = prepareFacadeData();
        Consumer<List<SafetyOfTheMonthExcelDto>> consumer = getConsumer(facade, importExcelDto);
        AbsExcelListenerConsumer<SafetyOfTheMonthExcelDto> excelListenerConsumer = new AbsExcelListenerConsumer<>(
                consumer, 500, importExcelDto.getStringBuilder());
        importExcelDto.setExcelListenerConsumer(excelListenerConsumer);
        return importExcelDto;*/
        return null;
    }

    @Override
    public void afterImportExcel(BaseImportExcelDto data) {

    }
}
